﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace mscook.core.domain
{
    public class Hotel : Entity
    {
        [Required(ErrorMessage = "酒店名必填")]
        [StringLength(12, ErrorMessage = "酒店名最多12位")]
        public virtual string Name
        {
            get;
            set;
        }

        public virtual string Address
        {
            get;
            set;
        }

        [Required(ErrorMessage = "责任编辑必填")]
        public virtual string Editor
        {
            set;
            get;
        }

        [Required(ErrorMessage = "合作酒店必填")]
        public virtual bool IsPartner
        {
            set;
            get;
        }

        [StringLength(500, ErrorMessage = "酒店简介50字符以内")]
        public virtual string Summary
        {
            set;
            get;
        }

        [RegularExpression(@"^(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$", ErrorMessage = "请填写正确的联系方式")]
        public virtual string PhoneNum
        {
            get;
            set;
        }

        public virtual string ImageName
        {
            get;
            set;
        }

        public virtual string Description
        {
            get;
            set;
        }

        public virtual Iesi.Collections.Generic.ISet<CookBook> CookBooks
        {
            get;
            set;
        }

        public virtual bool IsShowOnBottom
        {
            get;
            set;
        }

        public virtual string BottomImagePath
        {
            get;
            set;
        }

    }
}
